package com.fling.tutorial;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.fling.Locator;
import com.fling.observer.Subject;

public class SecondFlingState extends TutorialState {

	public SecondFlingState(TutorialManager t, Subject subject) {
		super(t, subject);
	}

	@Override
	public void update(float delta) {
		
	}

	@Override
	public void registerInput(INPUT input) {
		switch (input) {
		case CLIMB:
			break;
		case FALL:
			break;
		case JUMP_UP:
		case JUMP_DOWN:
			Locator.setOverallGameSpeed(0.5f);
			exit();
			break;
		default:
			break;
		}
	}

	@Override
	public void enter() {

	}

	@Override
	public void exit() {
		Locator.setOverallGameSpeed(0.5f);
		tutorial.changeState(new ThirdFlingState(tutorial, subject));
	}

	@Override
	public void render(SpriteBatch sb, NinePatch patch, BitmapFont font) {
		patch.draw(sb, Gdx.graphics.getWidth() * 0.35f, Gdx.graphics.getHeight() * 0.7f, Gdx.graphics.getWidth() * 0.55f,
				Gdx.graphics.getHeight() * 0.15f);
		font.drawWrapped(sb, "Good!\nFling vertically", Gdx.graphics.getWidth() * 0.37f, Gdx.graphics.getHeight() * 0.81f,
				Gdx.graphics.getHeight() * 0.32f);

	}

}
